package ChenKaiTest;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import teacher.bean.Award;
import teacher.bean.Paper;
import teacher.bean.Patent;
import teacher.bean.Project;
import teacher.bean.Teacher;
import teacher.bean.Treatise;
import tools.StringDate;
import leader.bean.Leader;
import leader.print.AwardPrint;
import leader.print.PaperPrint;
import leader.print.PatentPrint;
import leader.print.ProjectPrint;
import leader.print.TreatisePrint;
import leader.service.DirectAwardService;
import leader.service.DirectPaperService;
import leader.service.DirectPatentService;
import leader.service.DirectProjectService;
import leader.service.DirectTeacherService;
import leader.service.DirectTreatiseService;
import leader.service.LeaderService;
import leader.service.MidteaexpService;
public class Test {
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		// 学科方向Bean测试
		// Leader leader = new Leader(0,"智能信息处理",0,1,"你是我的小雅小苹果","怎么爱你都不嫌多");
		// Leader leader = new Leader();
		// leader.setLeaid(0);
		// leader.setName("智能信息处理");
		// leader.setSubjectid(0);
		// leader.setTeacherid(1);
		// leader.setIntroduction("你是我的小雅小苹果");
		// leader.setRemarks("怎么爱你都不嫌多");
		// System.out.println(leader.getLeaid());
		// System.out.println(leader.getName());
		// System.out.println(leader.getSubjectid());
		// System.out.println(leader.getTeacherid());
		// System.out.println(leader.getIntroduction());
		// System.out.println(leader.getRemarks());
		// LeaderService leader = new LeaderService();
		// Teacher teacher = new Teacher();
		// teacher.setTeaId(14);
		// teacher.setName("陈凯");
		// teacher.setUser("00001");
		// teacher.setPassword("123456");
		// teacher.setSubject(0);
		// teacher.setDirection(1);
		// teacher.setDuty("责任");
		// teacher.setDegree(3);
		// teacher.setState(4);
		// teacher.setOnline(9);
		// StringDate date = new StringDate();
		// teacher.setBirthday(date.StringToDate("2014-03-11"));
		// teacher.setExpertClass(7);
		// teacher.setFurStud("这是什么");
		// teacher.setTopSchool("顶级学校");
		// teacher.setTopMajor("备注");
		// System.out.println(leader.insertTeacher(teacher));
		// 方向教师查询
		// List<Teacher> teach = new ArrayList<Teacher>();
		// teach = leader.selectAllDirectTeacher(teacher);
		// System.out.println(teach.size());
		// Teacher teacherOne = new Teacher();
		// teacherOne = teach.get(0);
		// System.out.println(teacherOne.getName());
		// 获奖查询
		// List<Award> lists = leader.selectAllDirectAward(teacher);
		// System.out.println(lists.size());
		// Award award = lists.get(0);
		// System.out.println(award.getLevel());
		// 毕业论文查询
		// List<Degreepaper> lists = leader.selectAllDirectDegreepaper(teacher);
		// Degreepaper patent = lists.get(0);
		// System.out.println(patent.getName());
		// 论文查询
		// List<Paper> lists = leader.selectAllDirectPaper(teacher);
		// Paper paper = lists.get(0);
		// System.out.println(paper.getName());
		// 专利查询
		// List<Patent> lists = leader.selectAllDirectPatent(teacher);
		// Patent patent = lists.get(0);
		// System.out.println(patent.getEmpowerUnit());
		// 项目查询
		// List<Project> lists = leader.selectAllDirectProject(teacher);
		// Project project = lists.get(0);
		// System.out.println(project.getNumber());
		// 专著查询
		// List<Treatise> lists = leader.selectAllDirectTreatise(teacher);
		// Treatise treatise = lists.get(0);
		// System.out.println(treatise.getClass_());
		// System.out.println(leader.getCountOfDirectTeacher(teacher));
		// System.out.println(leader.getCountOfDirectAward(teacher));
		// System.out.println(leader.getCountOfDirectDegreepaper(teacher));
		// System.out.println(leader.getCountOfDirectPaper(teacher));
		// System.out.println(leader.getCountOfDirectPatent(teacher));
		// System.out.println(leader.getCountOfDirectProject(teacher));
		// System.out.println(leader.getCountOfDirectTreatise(teacher));
		// leader.selectSubject(teacher);
		// leader.selectTeacher(teacher);
		// Leader l = new Leader();
		// l.setName("信息处理与自动化");
		// l.setIntroduction("你是我的小呀小苹果");
		// l.setRemarks("吃多少都不嫌多");
		// leader.updateLeader(teacher, l);
		// Teacher t = new Teacher();
		// t.setName("陈凯");
		// t.setSubject(0);
		// t.setDirection(1);
		// t.setDegree(5);
		// leader.insertTeacher(t);
		// System.out.println(leader.selectAllExpertclass().get(0).getExpert());
		DirectTreatiseService tre = new DirectTreatiseService();
		// 论著模糊查询
		// String name = "浙江";
		// List<Treatise> list = tre.selectTreatiseLikeName(name,teacher);
		// System.out.println(list.get(0).getName());
		// 时间段查询
		// List<Treatise> list =
		// tre.selectDirectTreatiseByTime(date.StringToDate("2014-01-01"),
		// date.StringToDate("2016-01-01"),teacher);
		// System.out.println(list.get(0).getName());

		DirectAwardService awa = new DirectAwardService();
		// 获奖模糊查询
		// String name = "浙江";
		// List<Award> list = awa.selectAwardLikeName(name, teacher);
		// System.out.println(list.get(0).getName());
		// 时间段查询
		// List<Award> list =
		// awa.selectDirectAwardByTime(date.StringToDate("2014-01-01"),
		// date.StringToDate("2016-01-01"),teacher);
		// System.out.println(list.get(0).getName());
		// 工程
		// 时间段查询 //时间段查询
		// List<Award> list =
		// awa.selectDirectAwardByTime(date.StringToDate("2014-01-01"),
		// date.StringToDate("2016-01-01"),teacher);
		// System.out.println(list.get(0).getName());
		// DirectProjectService pro = new DirectProjectService();
		// List<Project> list =
		// pro.selectDirectProjectByTime(date.StringToDate("2014-01-01"),
		// date.StringToDate("2016-01-01"),teacher);
		// System.out.println(list.get(0).getName());

		DirectPaperService pap = new DirectPaperService();
		// List<Paper> list =
		// pap.selectDirectPaperByTime(date.StringToDate("2014-01-01"),
		// date.StringToDate("2016-01-01"),teacher);
		// System.out.println(list.get(0).getName());
		//
		// Leader M = leader.selectLeader(teacher);
		// System.out.println(M.getName());

		// Teacher t = new Teacher();
		// t.setTeaId(14);
		// MidteaexpService mid = new MidteaexpService();
		// mid.getAllExpById(t);

		// MidteaexpService midtable = new MidteaexpService();
		// midtable.insertMidteaexp(14, 3);
		// DirectTeacherService TS = new DirectTeacherService();
		// TS.updateDeacherInfo(teacher, teacher);
		// pap.getCountOfDirectPaper(teacher);
		// pap.selectSegregateAllDirectPaper(teacher, 2, 1);
		// Award award = new Award();
		// award.setState(1);
		// System.out.println(awa.getCountOfDirectAwardByState(teacher, award));
		// System.out.println(awa.selectSegregateDirectAwardByState(teacher,
		// award, 1, 1).get(0).getName());
//		DirectTreatiseService DS = new DirectTreatiseService();
//		Teacher tea = new Teacher();
//		tea.setDirection(1);
//		tea.setTeaId(385);
//		TreatisePrint PP = new TreatisePrint();
//		PP.printTreatise(DS.selectAllDirectTreatise(tea));
		StringDate date = new StringDate();
		MidteaexpService ms = new MidteaexpService();
//		ms.insertMidteaexp(373, 5, date.StringToDate("2015-07-14"));
		Teacher teacher = new Teacher();
		teacher.setTeaId(373);
		ms.delMidTableByTeaId(teacher);
	}
}
